<?php
//查找商家数据库
$sql="select * from ".$BIAOTOU."mall where end_time >='".date('Y-m-d')."' order by sort desc limit 0,8";
$rs_mall=mysql_query($sql);

$sql="select * from ".$BIAOTOU."malltype order by sort asc limit 0,7";
$rs_malltype=mysql_query($sql);

$sql="select id,name,fan,catid from ".$BIAOTOU."mall where end_time >='".date('Y-m-d')."' order by sort desc";
$rs_malllist=mysql_query($sql);
$i=0;
while ($row2 = mysql_fetch_array($rs_malllist)){
	$allmalllist[$i]['id']= $row2['id'];
	$allmalllist[$i]['catid']= $row2['catid'];
	$allmalllist[$i]['name']= $row2['name'];
	$allmalllist[$i]['fan']= $row2['fan'];
	$allmalllist[$i]['catid']= $row2['catid'];
	$i++;
}

//幻灯片
$sql="select * from ".$BIAOTOU."slides where hide=0 order by wz asc limit 0,10";
$rs_slides=mysql_query($sql);
$i=0;
while ($row = mysql_fetch_array($rs_slides)){
	$slides_pic[$i]=$row['pic'];
	$slides_url[$i]=$row['url'];
	$slides_title[$i]=$row['title'];
	$i++;
}

//热门店铺
$sql="select * from ".$BIAOTOU."shop order by tuijian desc, id desc  limit 0,5";
$rs_shop=mysql_query($sql);

//常见问题
$sql="select * from ".$BIAOTOU."article where cid=3 order by ontop desc,created_date desc limit 0,10";
$rs_article=mysql_query($sql);

//图片资讯
$sql="select * from ".$BIAOTOU."article where pic<>'' and cid>3 order by ontop desc,created_date desc limit 0,2";
$rs_pic_article=mysql_query($sql);

//购物资讯
$sql="select * from ".$BIAOTOU."article where cid>3 order by ontop desc,created_date desc limit 0,5";
$rs_new_article=mysql_query($sql);

//站点公告
$sql="select * from ".$BIAOTOU."article where cid=2 order by ontop desc,created_date desc limit 0,4";
$rs_gg=mysql_query($sql);

//文字商城
$sql="select * from ".$BIAOTOU."mall order by sort desc limit 8,17";
$rs_mall2=mysql_query($sql);

//带图优惠促销
$sql="select id,name,pic from ".$BIAOTOU."activity where recommend=1 and pic<>'' order by sort desc, etime desc limit 2";
$pic_cuxiao=mysql_query($sql);

//文字优惠促销
$sql="select a.id,a.name,a.pic,a.mallid,b.name as mallname from ".$BIAOTOU."activity as a,".$BIAOTOU."mall as b where a.mallid=b.id and a.recommend=1 order by a.sort desc, a.etime desc limit 2,6";
$cuxiao=mysql_query($sql);

//积分兑换
$sql="select * from ".$BIAOTOU."dhlist where recommend=1 and hide=0 order by sort desc, addtime desc limit 4";
$duihuan=mysql_query($sql);

//团购商品
$sql="select a.id,a.title,a.image,a.price,a.value,b.name,b.fan from ".$BIAOTOU."tuan_goods as a,".$BIAOTOU."mall as b where a.mall_id=b.id order by a.top desc,a.sort desc, endTime desc limit 5";
$tuan_goods=mysql_query($sql);

//热门分享
$sql="select image,title,id,sort from ".$BIAOTOU."shai order by sort desc ,id desc limit 21";
$query=mysql_query($sql);
while($row=mysql_fetch_array($query)){
    $shai[]=$row;
}

//友情链接
$sql="select * from ".$BIAOTOU."yqlj where leibie=0 order by wz desc";
$rs_yqlj=mysql_query($sql);

//合作伙伴
$sql="select * from ".$BIAOTOU."yqlj where leibie=1 and pic<>'' order by wz desc";
$rs_hzhb=mysql_query($sql);

$Taoapi_Config = Taoapi_Config::Init();
$Taoapi_Config->setCharset('UTF-8');
$Taoapi = new Taoapi;
//热销
$Taoapi->method = 'taobao.taobaoke.items.get';
$Taoapi->fields = 'iid,num_iid,title,nick,pic_url,price,click_url,shop_click_url,volume,commission,commission_rate,commission_num,commission_volume,';
$Taoapi->nick = MYUSERNICK;
$Taoapi->keyword = HOTWORD;
$Taoapi->page_size = '4';
$Taoapi->sort = 'commissionNum_desc';
$Taoapi->outer_code=$_SESSION["dduserid"];
$rexiaoapi= $Taoapi->Send('get','xml')->getArrayData();
$ListHot = $rexiaoapi["taobaoke_items"]["taobaoke_item"]; 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="html" xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn">
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta name="author" content="duoduo123.com-120205" />
<?php include(DDROOTPATH.'/cache/title/'.$pagetag.'_title.php');?>
<link rel="stylesheet" rev="stylesheet" href="template/<?=MOBAN?>/css/index.css" type="text/css" media="screen">
<link rel="stylesheet" rev="stylesheet" href="template/<?=MOBAN?>/css/public.css" type="text/css" media="screen">
<LINK rel=stylesheet type=text/css href="template/<?=MOBAN?>/css/common.css">
<script type="text/javascript" src="template/<?=MOBAN?>/js/jquery-1.3.2.min.js"></script>
<SCRIPT type="text/javascript" src="template/<?=MOBAN?>/js/base64.js"></SCRIPT>
<SCRIPT type="text/javascript" src="template/<?=MOBAN?>/js/function.js"></SCRIPT>
<SCRIPT type="text/javascript" src="template/<?=MOBAN?>/js/taobao.js"></SCRIPT>
<style type="text/css"> 
.container, .container *{margin:0; padding:0;}
.container{width:500px; height:245px; overflow:hidden;position:relative;}
.slider{position:absolute;}
.slider li{ list-style:none;display:inline;}
.slider img{ width:500px; height:245px; display:block;}
.slider2{width:5000px;}
.slider2 li{float:left;}
.num{ position:absolute; right:5px; bottom:5px;}
.num li{
	float: left;
	color: #FF7300;
	text-align: center;
	line-height: 16px;
	width: 16px;
	height: 16px;
	font-family: Arial;
	font-size: 12px;
	cursor: pointer;
	overflow: hidden;
	margin: 3px 1px;
	border: 1px solid #FF7300;
	background-color: #fff;
}
.num li.on{
	color: #fff;
	line-height: 21px;
	width: 21px;
	height: 21px;
	font-size: 16px;
	margin: 0 1px;
	border: 0;
	background-color: #FF7300;
	font-weight: bold;
}
</style>
<script language="javascript" >
$(function(){
	 var len2  = $("#idNum2 > li").length;
	 var index2 = 0;
	 $("#idNum2 li").mouseover(function(){
		index2  =   $("#idNum2 li").index(this);
		showImg2(index2);
	});	

	 $('#idTransformView2').hover(function(){
			  if(MyTime2){
				 clearInterval(MyTime2);
			  }
	 },function(){
			  MyTime2 = setInterval(function(){
				showImg2(index2)
				index2++;
				if(index2==len2){index2=0;}
			  } , 4000);
	 });
	 //自动开始
	 var MyTime2 = setInterval(function(){
		showImg2(index2)
		index2++;
		if(index2==len2){index2=0;}
	 } , 4000);
})
function showImg2(i){
		$("#idSlider2").stop(true,false).animate({left : -500*i},1000);
		 $("#idNum2 li")
			.eq(i).addClass("on")
			.siblings().removeClass("on");
}
</script>
<script language="javascript">
$.ajaxSetup ({
    cache: false //关闭AJAX相应的缓存
});
$(function(){
	$("#fenxiang_img .fenxiang_shangzhuang .fen_xiang:eq(0)").css({"width":"206px","height":"206px"});
	$("#fenxiang_img .fenxiang_shangzhuang .fen_xiang:eq(0) img").css({"width":"203px","height":"203px"});
	
	$("#fenxiang_img .fenxiang_xiazhuang .fen_xiang:eq(0)").css({"width":"206px","height":"203px"});
	$("#fenxiang_img .fenxiang_xiazhuang .fen_xiang:eq(0) img").css({"width":"203px","height":"203px"});
	
	$("#fenxiang_img .fenxiang_xiezi .fen_xiang:eq(0)").css({"width":"103px"});
	$("#fenxiang_img .fenxiang_baobao .fen_xiang:eq(1)").css({"float":"right"});
	$("#fenxiang_img .fenxiang_neiyi .fen_xiang:eq(1)").css({"float":"right"});
	$("#fenxiang_img .fenxiang_jiaju_qita .fen_xiang:eq(0)").css({"width":"103px"});
	$("#fenxiang_img .fenxiang_jiaju_qita .fen_xiang:eq(1)").css({"width":"103px"});
	
	$("#fenxiang_text .fenxiang_xiezi .fen_xiang:eq(0)").css({"width":"103px"});
	$("#fenxiang_text .fenxiang_baobao .fen_xiang:eq(1)").css({"float":"right"});
	$("#fenxiang_text .fenxiang_neiyi .fen_xiang:eq(1)").css({"float":"right"});
	$("#fenxiang_text .fenxiang_jiaju_qita .fen_xiang:eq(0)").css({"width":"103px"});
	$("#fenxiang_text .fenxiang_jiaju_qita .fen_xiang:eq(1)").css({"width":"103px"});
	
	$("#fenxiang_text .fenxiang_shangzhuang .fen_xiang:eq(0)").css({"width":"206px","height":"206px"});
	$("#fenxiang_text .fenxiang_shangzhuang .fen_xiang:eq(0) a").css({"width":"203px","height":"203px"});
	
	$("#fenxiang_text .fenxiang_xiazhuang .fen_xiang:eq(0)").css({"width":"206px","height":"206px"});
	$("#fenxiang_text .fenxiang_xiazhuang .fen_xiang:eq(0) a").css({"width":"203px","height":"203px"});
	
	$("#fenxiang_text .fenxiang_shangzhuang .fen_xiang:eq(2)").css({"position":"absolute","margin-top":"103px","margin-left":"-100px"});
	$("#fenxiang_img .fenxiang_shangzhuang .fen_xiang:eq(2)").css({"position":"absolute","margin-top":"103px","margin-left":"-100px"});
	
	$("#fenxiang_text .fenxiang_xiazhuang .fen_xiang:eq(2)").css("id","qufenxiazhuang");
	$("#fenxiang_img .fenxiang_xiazhuang .fen_xiang:eq(2)").css("id","qufenxiazhuang_img");
	
	var ll=$("#zuixinshandan .goods_list_img").length-1;
	$("#zuixinshandan .goods_list_img:eq("+ll+")").css({"padding-right":"0","border-right":"none","width":"220px"});
	$("#zuixinshandan").css({"width":"948px"});
	$('.goods_list_img_i').hover(function(){
		$('.goods_list_img_i').css("filter","alpha(opacity=55)").css('opacity',0.5);
	    $(this).css("filter","alpha(opacity=100)").css('opacity',1);
	},function(){
	    $('.goods_list_img_i').css("filter","alpha(opacity=100)").css('opacity',1);
	});
	
    $('.checkLogin').click(function(){
		url=$(this).attr('href');
		var ddusername='<?=$_SESSION["duoduouser"]?>';
		var img=$(this).parent('p').parent('li').find('img').attr('src');
		var price=$(this).parent('p').parent('li').find('.hot_goods_list_num').find('b').html();
		var fx=$(this).parent('p').parent('li').attr('fanli');
		$('#layer_goods').show();
		$('#jump_pic').attr('src',img);
		$('#jump_href').attr('href',url);
		$('.jump_price').text(price+'元');
		$('#jump_back').text(fx+'元');
	    if(ddusername!=''){
			window.open(url);
		}
		else{
		    $('.jumpbox').show();
		}
	return false;
	});
	
	$('#jump_href,#jumpclose').click(function(){
	    $('.jumpbox').hide();
	});
});
</script>
<SCRIPT language=JavaScript>
/*定义js路径*/
var contextPath = "http://<?=URL?>/";
<!--是否开启伪静态-->
var rewrite = <?=WJT?>;
<!--是否开启图片伪本地化-->
var taopicopen = 1;
</SCRIPT>
</head>
<body>
<?php
include("header.tpl.php");
?>
<?php
include("nav.tpl.php");
?>
<div class="index">  
<div id="ad1"><?=AD(1)?></div>
	<div class="mall"> 
<!-- 全部返现商家 Start -->
<div class="menu templateNeedDelete">
<H2><SPAN class=exp>全部返现商家</SPAN></H2>
<UL>
  <?php
  while ($row1 = mysql_fetch_array($rs_malltype)) {?>
  <LI onmouseover="this.className='on';" onmouseout="this.className='';">
    <H3><EM><?=$row1['typename']?></EM></H3>
	<P><?php 
	$i=0;
	foreach ($allmalllist as $row2){
		if($row2["catid"]==$row1["typecode"]&&$i<2){
			echo "<a href=\"mall".$url_head_id.$row2["id"].$url_end."\">".$row2["name"]."</a>&nbsp;&nbsp;";
			$i++;
		}
	}
	?></P>
    <DIV class=menu_show onmouseover="this.parentNode.className='on';" onmouseout="this.parentNode.className='';">
      <CITE></CITE>
      <DL>
        <DT><STRONG><?=$row1['typename']?>所有商家：</STRONG></DT>
        <?php 
		$i=0;
		foreach ($allmalllist as $row3){
			if($row3["catid"]==$row1["typecode"]&&$i<20){
				echo "<DD><a href=\"mall".$url_head_id.$row3['id'].$url_end."\" target=\"_blank\">".$row3['name']."（最高返".$row3['fan']."）</A></DD>";
				$i++;
			}
		}
		?>
        <div style="clear:both"></div>
      </DL>
    </DIV>
  </LI>
  <?php }?>  
</UL>
</div>
		<!-- 全部返现商家 End -->	
        <?php if(TGOPEN==1){?>	
		<div class="frame post" style="height:519px">
			<h2><span>团购商品</span></h2>
			<ul style="width:197px; overflow:hidden;">
				<?php
				while($row = mysql_fetch_array($tuan_goods))
				
				{?>
					<li class="tbdpleft">
						<div onMouseOver="this.className='tbdplist2left'" onMouseOut="this.className='tbdplist1left'" class="tbdplist1left">
						<div style="float:left; height:70px; width:70px; margin-top:5px; margin-left:5px;"><A href="tgview<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="nolink" title="进入<?php echo $row['nick'] ?>的店铺"><img src="<?=$row['image']?>" title="<?=$row['title']?>" alt="<?=$row['title']?>" style=" width:65px; height:65px"  /></a></div>
						<div style="float:left; margin-left:0px; height:70px; width:90px; line-height:20px; overflow:hidden; margin-top:3px;">
							<div style="width:120px; height:22px; line-height:22px; overflow:hidden; text-align:left"><A href="tgview<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="nolink"><?=$row['name']?></A></div>
							<div style="width:120px; height:22px; line-height:22px; overflow:hidden;text-align:left"><A href="tgview<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="nolink">最高返：<?=$row['fan']?></A></div>
							<div style="width:120px; height:22px; line-height:22px; overflow:hidden;text-align:left"><A href="tgview<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="nolink">团购价：<?=$row['price']?></A></div>
						</div>
						</div>
					</li>
				<?php }?>
			</ul>
		</div>
        <?php }else{?>
        <div class="frame service" style="clear:both">
			<h2>返现客服</h2>
			<p class="exp">返现过程遇到问题请联系</p>
			<p class="qq" style="height:45px;"><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<?=QQ?>&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:<?=QQ?>:46" alt="点击这里给我发消息" title="点击这里给我发消息"></a>
            			<a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid=<?=urlencode(MYUSERNICK)?>&site=cntaobao&s=1&charset=utf-8" ><img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid=<?=urlencode(MYUSERNICK)?>&site=cntaobao&s=1&charset=utf-8" alt="点击这里给我发消息" /></a></p>
		</div>
		<!-- 返现服务专线 End --
		>
 		<!-- 广告位2 Start -->
		<div class="frame limit_time" style="border:0px;">
			<div id="ad2"><?=AD(2)?></div>
		</div>
        <?php }?>
		<div class="frame faq">
			<h2><span>常见问题</span></h2>
			<ul><?php while ($row = mysql_fetch_array($rs_article)) {?>
				<li class="template_module template_copy"><a href="read<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="template_mod" etype="innerHTML&href"><?=$row['title']?></a></li>
				<?php }?>
			</ul>
		</div>
		<!-- 常见问题 End --> 
	</div>
	
	<!-- main content Start -->
	<div class="main">
		<!-- 幻灯片 Start -->
			<div class="container" id="idTransformView2">
			  <ul class="slider slider2" id="idSlider2">
              <?php
			  foreach($slides_url as $k=>$v){?>
				<li><a href="<?=$slides_url[$k]?>" target="_blank" title="<?=$slides_title[$k]?>"><img src="upload/<?=$slides_pic[$k]?>" alt="<?=$slides_title[$k]?>"/></a></li>
			  <?php }?>
              </ul>
			  <ul class="num" id="idNum2">
              <?php
			  foreach($slides_url as $k=>$v){?>
				<li><?=$k+1?></li>
			  <?php }?>
			  </ul>
			</div>
		<!-- 幻灯片 End -->

		<!-- 推荐商家 Start -->
		<div class="mall_commend"> 
			<h2><span>推荐商家</span></h2>
			<div class="mall_content">
				<ul class="content_item" id="top_malls">
					<?php while ($row = mysql_fetch_array($rs_mall)) {?>
					<li class="template_module">
                    <div onMouseOver="this.className='tbdplist4'" onMouseOut="this.className='tbdplist3'" class="tbdplist3">
						<p class="picture"><a href="mall<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank"><img src="<?=$row['logo']?>" alt="<?=$row['name']?>" class="template_mod" width="113px" height="50px"></a></p>
						<p class="name template_mod" etype="mallid" mallid="10000">最高返<span><?=$row['fan']?></span></p></div>
					</li>
					<?php }?>
				</ul>
			</div>
			<p class="more_link template_module"><a href="malllist<?=$end?>" target="_blank" class="template_mod" etype="href&innerHTML">查看全部>></a></p>
		</div>
		<!-- 推荐商家 End -->
 		<!-- 淘宝热卖 Start -->
		<div class="use_fanli"> 
			<h2><span>淘宝热卖</span></h2>
			<div class="mall_content">
				<ul>
				<?php for($i = 0; $i < count($ListHot); $i++) {
				$hottitle=str_replace("'","",$ListHot[$i]["title"]);
				$hottitle=strip_tags($hottitle);
				$gourl="href=\"view".$url_head_iid.encode_url($ListHot[$i]["num_iid"]).$url_end."\" target=\"_blank\"";
				?>
					<li style="width:119px; border:1px solid #ddd; margin-left:3px;" fanli="<?=ck_fxje($ListHot[$i]["commission"],$_SESSION['dduserlevel'])?>">
						<p class="picture"><a <?=$gourl?>><?=html_img($ListHot[$i]["pic_url"]."_100x100.jpg",$hottitle,'',100,100)?></a></p>
						<p class="name"><a <?=$gourl?>>淘宝价:<span class="hot_goods_list_num">￥<b><?php echo $ListHot[$i]["price"]; ?></b></span> 元</a></p>
						<p><a <?=$gourl?>>可返现:<span class="hot_goods_list_num"><b><? echo ck_fxje($ListHot[$i]["commission"],$_SESSION['dduserlevel'])?></b></span> 元</a></p>					
					</li>
				<?php } ?>
				</ul>
			</div>
			<p class="more_link template_module"><a href="list<?=$end?>" target="_blank" class="template_mod" etype="href&innerHTML">查看全部>></a></p>
		</div>
		<!-- 淘宝热卖 End -->

		<!-- 购物资讯 Start -->
		<div class="vip_sale"> 
			<h2><span class="exp">优惠促销</span></h2>
			<div class="mall_content">
				<ul class="content_item">
					<?php while ($row = mysql_fetch_array($pic_cuxiao)) {?>
					<li class="template_module">
						<p class="picture"><a href="cuxiao<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="template_mod" etype="href"><img src="<?=$row['pic']?>" alt="<?=$row['name']?>" class="artpic" etype="src"></a></p>
					</li>
					<?php }?>
				</ul>
				<ul class="content_text" style="">
                <?php while ($row = mysql_fetch_array($cuxiao)) {?>
					<li style="width:255px; overflow:hidden; line-height:20px; height:20px;"><div style="width:200px; height:20px; line-height:20px;"><a href="cuxiao<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="bluelink" etype="innerHTML&href">[<?=$row['mallname']?>] <?=$row['name']?></a></div>
					</li>
				<?php }?>
				</ul>
				<ul class="content_text templateNeedNull" id="content" style="display: none;"></ul>
 
			</div>
			<p class="more_link template_module"><a href="coupons<?=$end?>" target="_blank" class="template_mod" etype="href&innerHTML">查看全部>></a></p>
		</div>
		<!-- 购物资讯 End -->
 		<!-- 积分兑换 Start -->
		<div class="use_jifen"> 
			<h2><span>积分兑换</span></h2>
			<div class="mall_content">
				<ul>
                <?php while ($row = mysql_fetch_array($duihuan)) {?>
                    <li style="width:119px; border:1px solid #ddd; margin-left:3px; height:125px; padding-top:10px"><a href="huangou<?=$url_head_id?><?=$row['id']?><?=$url_end?>"><img src="<?=$row['pic']?>" alt="<?=$row['name']?>" border="0" style="width:100px; height:100px" /></a></br>
                    <a href="huangou<?=$url_head_id?><?=$row['id']?><?=$url_end?>"><?=$row['name']?></a>					
					</li>
                <?php }?>
				</ul>
			</div>
			<p class="more_link template_module"><a href="huan<?=$end?>" target="_blank" class="template_mod" etype="href&innerHTML">查看全部>></a></p>
		</div>
		<!-- 积分兑换 End -->
 
	</div>
	<!-- main content End -->
 
	<!-- side content Start -->
	<div class="side">
		   
		<!-- 返现引导 Start -->
		<div class="study">
			<div class="dostudy"><?php if($_SESSION["duoduouser"]!=''){?><a href="user/center.php" class="template_mod" etype="innerHTML&href">欢迎回来：<?=$_SESSION["duoduouser"]?></a><?php }else {?><a href="user/register.php" target="_blank" class="template_mod" etype="innerHTML&href">马上注册<?=WEBNICK?>会员</a><?php }?></div>
		</div>
		<!-- 返现引导 End -->
 
		<!-- 返现公告 Start -->
		<div class="frame notice">
			<h2><span>返现公告</span></h2>
			<ul>
			<?php while ($row = mysql_fetch_array($rs_gg)) {?>
				<li><div style="line-height:20px; height:20px; width:180px; overflow:hidden"><a href="read<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="template_mod" etype="innerHTML&href"><?=$row['title']?></a></div></li>
			<?php }?>
			</ul>
		</div>
		<!-- 返现公告 End -->
 
		
		<!-- 淘宝店铺 Start -->
		<div class="frame post">
			<h2><span>淘宝店铺</span></h2>
			<ul style="width:225px; overflow:hidden">
				<?php
				while($row3 = mysql_fetch_array($rs_shop))
				
				{?>
					<li class="tbdp">
						<div onMouseOver="this.className='tbdplist2'" onMouseOut="this.className='tbdplist1'" class="tbdplist1">
						<div style="float:left; height:70px; width:70px; margin-top:5px; margin-left:5px;"><A href="shoplist<?=$url_head_keyword?><?php echo urlencode($row3['nick']) ?><?=$url_end?>" target="_blank" class="nolink" title="进入<?php echo $row3['nick'] ?>的店铺"><?=html_img("http://logo.taobaocdn.com/shop-logo".$row3['pic_path'],$row3['title'],'',65,65)?></a></div>
						<div style="float:left; margin-left:0px; height:70px; width:120px; line-height:20px; overflow:hidden; margin-top:3px;">
							<div style="width:120px; height:22px; line-height:22px; overflow:hidden; text-align:left"><A href="shoplist<?=$url_head_keyword?><?php echo urlencode($row3['nick']) ?><?=$url_end?>" target="_blank" class="nolink" title="进入<?php echo $row3['nick'] ?>的店铺">掌柜：<?=$row3['nick']?></A></div>
							<div style="width:120px; height:22px; line-height:22px; overflow:hidden;text-align:left"><A href="shoplist<?=$url_head_keyword?><?php echo urlencode($row3['nick']) ?><?=$url_end?>" target="_blank" class="nolink" title="进入<?php echo $row3['nick'] ?>的店铺"><?php if($row3["type"]=="B"){echo "<img src=\"template/".MOBAN."/images/shangcheng.png\" alt=\"商城卖家\"  align=\"middle\">"; }else {echo " <img src=\"images/level_".$row3["level"].".gif\" alt=\"集市卖家\" align=\"absmiddle\" />";} ?></A></div>
							<div style="width:120px; height:22px; line-height:22px; overflow:hidden;text-align:left"><A href="shoplist<?=$url_head_keyword?><?php echo urlencode($row3['nick']) ?><?=$url_end?>" target="_blank" class="nolink" title="进入<?php echo $row3['nick'] ?>的店铺">所在地：<?=$row3['city']?></A></div>
						</div>
						</div>
					</li>
				<?php }?>
			</ul>
		</div>
		<!-- 淘宝店铺 End -->
 		<!-- 购物资讯 Start -->
		<div class="frame notice">
			<h2><span>购物资讯</span></h2>
			<ul>
			<?php while ($row = mysql_fetch_array($rs_new_article)) {?>
				<li><div style="line-height:20px; height:20px; width:180px; overflow:hidden"><a href="read<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="template_mod" etype="innerHTML&href"><?=$row['title']?></a></div></li>
			<?php }?>
			</ul>
		</div>
		<!-- 购物资讯 End -->
 
	</div>
    <?php if(count($shai)>20){ ?>
    <div class="wrap wrap4" style="overflow:hidden;">
<div class="biaoti" style="overflow:hidden;">热门分享</div>
  <!-- 最新分享 开始 -->
<div class="fenxiang" style="overflow:hidden;">
       <!-- 最新分享 开始 -->
    <div class="goods" style="clear:both;overflow:hidden;">
<div id="fenxiang_wrap" style="padding-right:0;">   
     
    <div id="fenxiang_img">
    <div class="fenxiang_left">
    <div class="fenxiang_meizhaung">
    <?php for($i=0;$i<2;$i++){?>
	    <div class="fen_xiang">
          <a class="img" target="_blank" href="baobei<?=$url_head_id?><?=$shai[$i]['id']?><?=$url_end?>">
          <?=html_img($shai[$i]['image'],$shai[$i]['title'],'goods_list_img_i',"","")?></a>
        </div>
    <?php }?>
    </div>  

    <div class="fenxiang_shangzhuang">
     <?php for($i=2;$i<5;$i++){?>
	    <div class="fen_xiang">
          <a class="img" target="_blank" href="baobei<?=$url_head_id?><?=$shai[$i]['id']?><?=$url_end?>">
          <?=html_img($shai[$i]['image'],$shai[$i]['title'],'goods_list_img_i',"","")?></a>
        </div>
    <?php }?>
          </div>
    
    <div class="clear"></div>
    
      <div class="fenxiang_xiezi">
         <?php for($i=5;$i<7;$i++){?>
	    <div class="fen_xiang">
          <a class="img" target="_blank" href="baobei<?=$url_head_id?><?=$shai[$i]['id']?><?=$url_end?>">
          <?=html_img($shai[$i]['image'],$shai[$i]['title'],'goods_list_img_i',"","")?></a>
        </div>
    <?php }?>
            </div>

      <div class="fenxiang_baobao">
        <?php for($i=7;$i<9;$i++){?>
	    <div class="fen_xiang">
          <a class="img" target="_blank" href="baobei<?=$url_head_id?><?=$shai[$i]['id']?><?=$url_end?>">
          <?=html_img($shai[$i]['image'],$shai[$i]['title'],'goods_list_img_i',"","")?></a>
        </div>
    <?php }?>
            </div>

    </div>
    
     <div class="fenxiang_center">

     <div class="fenxiang_neiyi">
        <?php for($i=9;$i<11;$i++){?>
	    <div class="fen_xiang">
          <a class="img" target="_blank" href="baobei<?=$url_head_id?><?=$shai[$i]['id']?><?=$url_end?>">
          <?=html_img($shai[$i]['image'],$shai[$i]['title'],'goods_list_img_i',"","")?></a>
        </div>
    <?php }?>
            </div>

    <div class="fenxiang_peishi">
         <?php for($i=11;$i<13;$i++){?>
	    <div class="fen_xiang">
          <a class="img" target="_blank" href="baobei<?=$url_head_id?><?=$shai[$i]['id']?><?=$url_end?>">
          <?=html_img($shai[$i]['image'],$shai[$i]['title'],'goods_list_img_i',"","")?></a>
        </div>
    <?php }?>
            </div>

    <div class="fenxiang_shuma">
         <?php for($i=13;$i<15;$i++){?>
	    <div class="fen_xiang">
          <a class="img" target="_blank" href="baobei<?=$url_head_id?><?=$shai[$i]['id']?><?=$url_end?>">
          <?=html_img($shai[$i]['image'],$shai[$i]['title'],'goods_list_img_i',"","")?></a>
        </div>
    <?php }?>
            </div>
    
    </div>
    
    <div class="fenxiang_right">
    
    <div class="fenxiang_jiaju_qita">
        <?php for($i=15;$i<18;$i++){?>
	    <div class="fen_xiang">
          <a class="img" target="_blank" href="baobei<?=$url_head_id?><?=$shai[$i]['id']?><?=$url_end?>">
          <?=html_img($shai[$i]['image'],$shai[$i]['title'],'goods_list_img_i',"","")?></a>
        </div>
    <?php }?>
    </div>

    <div class="fenxiang_xiazhuang">
         <?php for($i=18;$i<21;$i++){?>
	    <div class="fen_xiang">
          <a class="img" target="_blank" href="baobei<?=$url_head_id?><?=$shai[$i]['id']?><?=$url_end?>">
          <?=html_img($shai[$i]['image'],$shai[$i]['title'],'goods_list_img_i',"","")?></a>
        </div>
    <?php }?>
            </div>
    </div>
    </div>
</div>
  </div>
  	<!-- 最新分享 结束 -->
</div>
</div>
<?php }?>
	<!-- side content End -->
</div>
<div class="clear"></div>
<div class="yqlj"> 
	<div class="yqljtitle">友情链接:</div>
	<ul class="yqljlist">
	<?php while ($row = mysql_fetch_array($rs_yqlj)) {?>
		<li><a href="<?=$row['url']?>" target="_blank" title="<?=$row['webname']?>"><?=$row['webname']?></a></li>
	<?php }?>
	</ul>
</div>  
<div class="yqlj" style="margin-top:5px;"> 
	<div class="yqljtitle">合作伙伴:</div>
	<div class="yqljlist">
	<ul>
	<?php while ($row = mysql_fetch_array($rs_hzhb)) {?>
		<li><a href="<?=$row['url']?>" target="_blank" title="<?=$row['webname']?>"><img src="upload/<?=$row['pic']?>" alt="<?=$row['webname']?>" width="82" height="50" border="0"></a></li>
	<?php }?>
	</ul>
	</div>
</div>  
<?php
	include("footer.tpl.php");
?>
</body></html>